home *** CD-ROM | disk | FTP | other *** search
- unit BMPDlg;
-
-
- interface
-
- uses
- Borland.Win32.Windows,
- Borland.Delphi.Classes,
- Borland.Vcl.Graphics,
- Borland.Vcl.Forms,
- Borland.Vcl.Controls,
- Borland.Vcl.Buttons,
- Borland.Vcl.StdCtrls,
- Borland.Vcl.ExtCtrls;
-
- type
- TNewBMPForm = class(TForm)
- OKBtn: TButton;
- CancelBtn: TButton;
- Bevel1: TBevel;
- Label1: TLabel;
- WidthEdit: TEdit;
- Label2: TLabel;
- HeightEdit: TEdit;
- private
- { Private declarations }
- procedure InitializeControls;
- public
- { Public declarations }
- constructor Create(AOwner: TComponent); override;
- end;
-
- var
- NewBMPForm: TNewBMPForm;
-
- implementation
-
-
- constructor TNewBMPForm.Create(AOwner: TComponent);
- begin
- inherited;
- InitializeControls;
- end;
- procedure TNewBMPForm.InitializeControls;
- begin
- // Initalizing all controls...
- Bevel1:= TBevel.Create(Self);
- Label1:= TLabel.Create(Self);
- Label2:= TLabel.Create(Self);
- OKBtn:= TButton.Create(Self);
- CancelBtn:= TButton.Create(Self);
- WidthEdit:= TEdit.Create(Self);
- HeightEdit:= TEdit.Create(Self);
-
- // Form's PMEs'
- Left:= 253;
- Top:= 114;
- BorderStyle:= bsDialog;
- Caption:= 'Bitmap Dimensions';
- ClientHeight:= 120;
- ClientWidth:= 233;
- Font.Color:= clBlack;
- Font.Height:= -11;
- Font.Name:= 'MS Sans Serif';
- Font.Style:= [];
- Position:= poScreenCenter;
- PixelsPerInch:= 96;
-
- with Bevel1 do
- begin
- Parent:= Self;
- Left:= 8;
- Top:= 8;
- Width:= 217;
- Height:= 65;
- Shape:= bsFrame;
- IsControl:= True;
- end;
-
- with Label1 do
- begin
- Parent:= Self;
- Left:= 24;
- Top:= 16;
- Width:= 23;
- Height:= 11;
- Caption:= '&Width';
- FocusControl:= WidthEdit;
- end;
-
- with Label2 do
- begin
- Parent:= Self;
- Left:= 24;
- Top:= 48;
- Width:= 26;
- Height:= 11;
- Caption:= '&Height';
- FocusControl:= HeightEdit;
- end;
-
- with OKBtn do
- begin
- Parent:= Self;
- Left:= 32;
- Top:= 84;
- Width:= 77;
- Height:= 27;
- Caption:= 'OK';
- Default:= True;
- ModalResult:= 1;
- TabOrder:= 0;
- end;
-
- with CancelBtn do
- begin
- Parent:= Self;
- Left:= 116;
- Top:= 84;
- Width:= 77;
- Height:= 27;
- Cancel:= True;
- Caption:= 'Cancel';
- ModalResult:= 2;
- TabOrder:= 1;
- end;
-
- with WidthEdit do
- begin
- Parent:= Self;
- Left:= 88;
- Top:= 12;
- Width:= 121;
- Height:= 24;
- TabOrder:= 2;
- end;
-
- with HeightEdit do
- begin
- Parent:= Self;
- Left:= 88;
- Top:= 44;
- Width:= 121;
- Height:= 24;
- TabOrder:= 3;
- end;
- ActiveControl:= OKBtn;
- end;
- end.
-